<#include "java_copyright.include">
<#assign className = table.className>   
<#assign classNameLower = className?uncap_first>
package ${basepackage}.${subpackage}.service.impl;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import ${basepackage}.${subpackage}.data.dao.I${className}DAO;
import ${basepackage}.${subpackage}.service.I${className}Service;

/**
 * 
 */
public class ${className}ServiceImpl implements I${className}Service{

	protected static Log log = LogFactory.getLog(${className}ServiceImpl.class);

	protected I${className}DAO ${classNameLower}DAO;

	public void set${className}DAO(I${className}DAO ${classNameLower}DAO) {
		this.${classNameLower}DAO = ${classNameLower}DAO;
	}

	
	public static void main(String[] args){
		String[] files = {"classpath:setting-for-unit-test.xml","classpath:applicationContext.xml","classpath:dao-context.xml","classpath:service-context.xml"};
		ApplicationContext ac = new ClassPathXmlApplicationContext(files);
		${className}ServiceImpl um = (${className}ServiceImpl)ac.getBean("${classNameLower}Service");
	}

}
